﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class SystemNetNetworkInformationNetworkInterfaceWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(System.Net.NetworkInformation.NetworkInterface);
			Utils.BeginObjectRegister(type, L, translator, 0, 5, 8, 0);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIPProperties", _m_GetIPProperties);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIPv4Statistics", _m_GetIPv4Statistics);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetIPStatistics", _m_GetIPStatistics);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPhysicalAddress", _m_GetPhysicalAddress);
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "Supports", _m_Supports);
			
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "Id", _g_get_Id);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "Name", _g_get_Name);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "Description", _g_get_Description);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "OperationalStatus", _g_get_OperationalStatus);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "Speed", _g_get_Speed);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "IsReceiveOnly", _g_get_IsReceiveOnly);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "SupportsMulticast", _g_get_SupportsMulticast);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "NetworkInterfaceType", _g_get_NetworkInterfaceType);
            
			
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 3, 2, 0);
			Utils.RegisterFunc(L, Utils.CLS_IDX, "GetAllNetworkInterfaces", _m_GetAllNetworkInterfaces_xlua_st_);
            Utils.RegisterFunc(L, Utils.CLS_IDX, "GetIsNetworkAvailable", _m_GetIsNetworkAvailable_xlua_st_);
            
			
            
			Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "LoopbackInterfaceIndex", _g_get_LoopbackInterfaceIndex);
            Utils.RegisterFunc(L, Utils.CLS_GETTER_IDX, "IPv6LoopbackInterfaceIndex", _g_get_IPv6LoopbackInterfaceIndex);
            
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "System.Net.NetworkInformation.NetworkInterface does not have a constructor!");
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            return LuaAPI.luaL_error(L, "System.Net.NetworkInformation.NetworkInterface does not have a constructor!");
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetAllNetworkInterfaces_xlua_st_(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
            
                
                {
                    
                        var gen_ret = System.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces(  );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetIsNetworkAvailable_xlua_st_(RealStatePtr L)
        {
		    try {
            
            
            
                
                {
                    
                        var gen_ret = System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable(  );
                        LuaAPI.lua_pushboolean(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetIPProperties(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                        var gen_ret = gen_to_be_invoked.GetIPProperties(  );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetIPv4Statistics(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                        var gen_ret = gen_to_be_invoked.GetIPv4Statistics(  );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetIPStatistics(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                        var gen_ret = gen_to_be_invoked.GetIPStatistics(  );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_GetPhysicalAddress(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                        var gen_ret = gen_to_be_invoked.GetPhysicalAddress(  );
                        translator.Push(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_Supports(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    System.Net.NetworkInformation.NetworkInterfaceComponent _networkInterfaceComponent;translator.Get(L, 2, out _networkInterfaceComponent);
                    
                        var gen_ret = gen_to_be_invoked.Supports( _networkInterfaceComponent );
                        LuaAPI.lua_pushboolean(L, gen_ret);
                    
                    
                    
                    return 1;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_LoopbackInterfaceIndex(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.xlua_pushinteger(L, System.Net.NetworkInformation.NetworkInterface.LoopbackInterfaceIndex);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_IPv6LoopbackInterfaceIndex(RealStatePtr L)
        {
		    try {
            
			    LuaAPI.xlua_pushinteger(L, System.Net.NetworkInformation.NetworkInterface.IPv6LoopbackInterfaceIndex);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Id(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.Id);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Name(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.Name);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Description(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushstring(L, gen_to_be_invoked.Description);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_OperationalStatus(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.OperationalStatus);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_Speed(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushint64(L, gen_to_be_invoked.Speed);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_IsReceiveOnly(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.IsReceiveOnly);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_SupportsMulticast(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.SupportsMulticast);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_NetworkInterfaceType(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                System.Net.NetworkInformation.NetworkInterface gen_to_be_invoked = (System.Net.NetworkInformation.NetworkInterface)translator.FastGetCSObj(L, 1);
                translator.PushSystemNetNetworkInformationNetworkInterfaceType(L, gen_to_be_invoked.NetworkInterfaceType);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
		
		
		
		
    }
}
